// Translator.h
// Define the class Translator
#ifndef TRANSLATOR_H
#define TRANSLATOR_H

namespace crossbit {

    class ProcessorState;
    class VBlock;
    class TBlock;
    
    // Translator translates and encodes the virtual instruction block (VBlock)
    // into runnable target machine code block. This is the ONLY class that is
    // target machine dependent
    class Translator {
	public:
	    virtual ~Translator() {}

	    Translator(ProcessorState *state) :
		src_state(state) {}

			virtual void encodeLibcFuncWrapper(XTMemAddr func, TBlock *tblock, XTInt32 argnum) = 0;
	    virtual void encode(VBlock *vblock, TBlock *tblock) = 0;

	protected:
	    
	    ProcessorState *src_state;

    };
}

#endif
